<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<h1>我是父组件的标题</h1>
			<my-component>
				<p>初始内容1</p>
				<p>初始内容2</p>
			</my-component>
		</div>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			Vue.component('my-component', {
				template: `
	<div>
	<h2>我是子组件的标题</h2>
	<slot>
	<p>如果父组件没用插入内容,我将作为默认出现</p>
	</slot>
	<div>
	`,
			})
			new Vue({
				el: '#app'
			})
		</script>


	</body>
</html>
